<?php

namespace App\Models\Press;

use Illuminate\Database\Eloquent\Model;

/**
 * @property string title
 */
class PressDescription extends Model
{
    protected $table = 'press_description';
    protected $guarded = [];

    /**
     * @return null|string
     */
    public function getDescriptionAttribute()
    {
        $description = $this->attributes['description'];

        if ($description) {
            return html_entity_decode($description, ENT_QUOTES, 'UTF-8');
        } else {
            return null;
        }
    }
}
